package com.guoxue.dao.impl;

import java.util.List;

import org.springframework.stereotype.Repository;

import com.guoxue.dao.IShopConfigDao;
import com.guoxue.domain.ShopConfigVo;

@Repository
public class ShopConfigDaoImpl extends BaseDaoImpl<ShopConfigVo> implements IShopConfigDao{

	@Override
	public List<ShopConfigVo> getShopConfigList() {
		return find("FROM ShopConfigVo s");
	}

	@Override
	public ShopConfigVo getShopConfig(int propId) {
		return get("FROM ShopConfigVo s WHERE s.propId = ? AND s.sysflag = 0", new Object[]{propId});
	}

	@Override
	public void saveShopConfig(ShopConfigVo sc) {
		saveOrUpdate(sc);
	}

	@Override
	public void deleteShopConfig(Integer id) {
		executeHql("DELETE FROM ShopConfigVo s WHERE s.id=?", new Object[] {id});
	}

}
